// -----------------------------------------------------------------------------
// Generate By Furion Tools v1.6.0                            
// -----------------------------------------------------------------------------

using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;

#nullable disable

namespace iemtm.WeChat.Core
{
    public partial class Generator : IEntity<MasterDbContextLocator>, IEntityTypeBuilder<Generator, MasterDbContextLocator>
    {

        public int GeneratorId { get; set; }
        public string GeneratorCode { get; set; }
        public bool? BOnline { get; set; }
        public string GensetNum { get; set; }
        public int? AreaId { get; set; }
        public string AreaCode { get; set; }
        public string AreaName { get; set; }
        public string CompanyCode { get; set; }
        public string Extension { get; set; }
        public int? WareHouseId { get; set; }
        public string WareHouseName { get; set; }
        public string LAC { get; set; }
        public string CellID { get; set; }
        public string ManagePerson { get; set; }
        public string PHONE { get; set; }
        public bool? bRunning { get; set; }
        public DateTime? GenStart { get; set; }
        public DateTime? GenStop { get; set; }
        public decimal? RunningPeriod { get; set; }
        public decimal? KWpower { get; set; }
        public int? OilConsume { get; set; }
        public string Alarms { get; set; }
        public int? GenRunTimes { get; set; }
        public int? AreaGenRunTimes { get; set; }
        public int? GenRunTimesPeriod { get; set; }
        public int? AreaGenRunTimesPeriod { get; set; }
        public int? UtilPercentPeriod { get; set; }
        public int? AverageUtilPercentPeriod { get; set; }
        public int? UtilPercent { get; set; }
        public int? AverageUtilPercent { get; set; }
        public decimal? GenRunPeriod { get; set; }
        public DateTime? LastGenStop { get; set; }
        public string LastGenBaseStation { get; set; }
        public string LastGenPlace { get; set; }
        public double? LastLongitude { get; set; }
        public double? LastLatitude { get; set; }
        public int? IdleDays { get; set; }
        public int? ManitTimes { get; set; }
        public DateTime? LastMaintDate { get; set; }
        public string LastMaintCompany { get; set; }
        public int? RepairTimes { get; set; }
        public int? AreaScrapTimes { get; set; }
        public string NextMaintLevelName { get; set; }
        public string NextRepairLevelName { get; set; }
        public int? NextMaintOutDays { get; set; }
        public int? NextRepairOutDays { get; set; }
        public int? IdleOutAlarmDelay { get; set; }
        public int? MaintOutAlarmDelay { get; set; }
        public DateTime? LastRepairDate { get; set; }
        public string LastRepairLevelName { get; set; }
        public int? RepairOutAlarmDelay { get; set; }
        public string DTUID { get; set; }
        public string DTUSIM { get; set; }
        public double? GenVoltage { get; set; }
        public double? GenCurrent { get; set; }
        public double? GenFreq { get; set; }
        public decimal? PowerFactor { get; set; }
        public decimal? ActivePower { get; set; }
        public bool? IsIdle { get; set; }
        public DateTime? OutWareHouseDate { get; set; }
        public string HealthCondition { get; set; }
        public bool? BEdited { get; set; }
        public int? GeneratorTypeId { get; set; }
        public string GeneratorTypeName { get; set; }
        public string GeneratorTypeNo { get; set; }
        public string GeneratorFactory { get; set; }
        public DateTime? OutFactoryDate { get; set; }
        public string OilType { get; set; }
        public double? RatedVoltage { get; set; }
        public double? RatedCurrent { get; set; }
        public int? VTPrimary { get; set; }
        public int? VTSecondary { get; set; }
        public decimal? RatedPower { get; set; }
        public double? RatedOilConsume { get; set; }
        public string GeneratorPhase { get; set; }
        public string MaintRuleName { get; set; }
        public string RepairRuleName { get; set; }
        public string PrjCode { get; set; }
        public string PrjName { get; set; }
        public double? BDLocLat { get; set; }
        public double? BDLocLgt { get; set; }
        public double? GPSLocLat { get; set; }
        public double? GPSLocLgt { get; set; }
        public DateTime? GPSLocTime { get; set; }
        public int? GPSLocType { get; set; }
        public bool? bGpsLoc { get; set; }
        public bool? bGenOnce { get; set; }
        public DateTime? LastCheckDt { get; set; }
        public DateTime? ltOnTime { get; set; }
        public DateTime? ltOffTime { get; set; }
        public DateTime? LGenRdSyncDt { get; set; }
        public bool? SEEMINGMAIN { get; set; }
        public int? CrankTimes { get; set; }
        public decimal? KWenergy { get; set; }
        public double? TOTCURRENT { get; set; }
        public double? ExtBATVolt { get; set; }
        public double? LiBATVolt { get; set; }
        public string GENALARM { get; set; }
        public bool? BATLOWVOLTALARM { get; set; }
        public int? sampIntervals { get; set; }
        public decimal? LoadOilConsume { get; set; }
        public decimal? EmptyOilConsume { get; set; }
        public string BaseStationName { get; set; }
        public string BaseStationCode { get; set; }
        public string GPSPOSITION { get; set; }
        public string AverageUsage { get; set; }
        public int? DepartmentId { get; set; }
        public string CompanyName { get; set; }
        public string WareHouseCode { get; set; }
        public int? Status { get; set; }
        public int? MigrationId { get; set; }
        public string EncryptionStr { get; set; }
        public int? LoadOilConsumeUnit { get; set; }
        public double? FuelLowAlarmTrip { get; set; }
        public bool? BFuelLowAlarm { get; set; }
        public string MaintainCompanyName { get; set; }
        public string MaintainContacts { get; set; }
        public string ContactsPhone { get; set; }
        public string MaintainPlace { get; set; }
        public bool? IsFixedSetup { get; set; }
        public string GensetAlias { get; set; }
        public bool? NeedRepaired { get; set; }
        public bool? NeedMaintenance { get; set; }
        public int? ComputedStatus { get; set; }
        public string BaseStationTTCode { get; set; }
        public string FACCODE { get; set; }
    
        public void Configure(EntityTypeBuilder<Generator> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
                entityBuilder.Property(e => e.ActivePower).HasColumnType("decimal(18, 3)");

                entityBuilder.Property(e => e.AreaCode).HasMaxLength(50);

                entityBuilder.Property(e => e.AreaGenRunTimes).HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.AreaGenRunTimesPeriod).HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.AreaId).HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.AreaName).HasMaxLength(50);

                entityBuilder.Property(e => e.AverageUsage)
                    .HasMaxLength(10)
                    .IsFixedLength(true);

                entityBuilder.Property(e => e.AverageUtilPercent).HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.AverageUtilPercentPeriod).HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.BOnline).HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.BaseStationCode).HasMaxLength(50);

                entityBuilder.Property(e => e.BaseStationName).HasMaxLength(300);

                entityBuilder.Property(e => e.BaseStationTTCode).HasMaxLength(50);

                entityBuilder.Property(e => e.CellID)
                    .HasMaxLength(20)
                    .HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.CompanyCode).HasMaxLength(50);

                entityBuilder.Property(e => e.CompanyName).HasMaxLength(200);

                entityBuilder.Property(e => e.ContactsPhone)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entityBuilder.Property(e => e.DTUID)
                    .HasMaxLength(50)
                    .HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.DTUSIM)
                    .HasMaxLength(50)
                    .HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.EmptyOilConsume).HasColumnType("decimal(18, 2)");

                entityBuilder.Property(e => e.EncryptionStr).HasMaxLength(50);

                entityBuilder.Property(e => e.Extension).HasMaxLength(20);

                entityBuilder.Property(e => e.FACCODE).HasMaxLength(20);

                entityBuilder.Property(e => e.FuelLowAlarmTrip).HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.GENALARM).HasMaxLength(500);

                entityBuilder.Property(e => e.GPSLocTime).HasColumnType("datetime");

                entityBuilder.Property(e => e.GPSPOSITION).HasMaxLength(100);

                entityBuilder.Property(e => e.GenRunPeriod)
                    .HasColumnType("decimal(18, 4)")
                    .HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.GenRunTimes).HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.GenRunTimesPeriod).HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.GenStart).HasColumnType("datetime");

                entityBuilder.Property(e => e.GenStop).HasColumnType("datetime");

                entityBuilder.Property(e => e.GeneratorCode).HasMaxLength(50);

                entityBuilder.Property(e => e.GeneratorFactory).HasMaxLength(50);

                entityBuilder.Property(e => e.GeneratorPhase).HasMaxLength(20);

                entityBuilder.Property(e => e.GeneratorTypeName).HasMaxLength(50);

                entityBuilder.Property(e => e.GeneratorTypeNo).HasMaxLength(50);

                entityBuilder.Property(e => e.GensetAlias).HasMaxLength(100);

                entityBuilder.Property(e => e.GensetNum).HasMaxLength(50);

                entityBuilder.Property(e => e.HealthCondition).HasMaxLength(20);

                entityBuilder.Property(e => e.IdleDays).HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.IsFixedSetup).HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.KWenergy).HasColumnType("decimal(18, 3)");

                entityBuilder.Property(e => e.KWpower)
                    .HasColumnType("decimal(18, 3)")
                    .HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.LAC)
                    .HasMaxLength(20)
                    .HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.LGenRdSyncDt).HasColumnType("datetime");

                entityBuilder.Property(e => e.LastCheckDt).HasColumnType("datetime");

                entityBuilder.Property(e => e.LastGenBaseStation).HasMaxLength(50);

                entityBuilder.Property(e => e.LastGenPlace).HasMaxLength(200);

                entityBuilder.Property(e => e.LastGenStop).HasColumnType("datetime");

                entityBuilder.Property(e => e.LastMaintCompany).HasMaxLength(100);

                entityBuilder.Property(e => e.LastMaintDate).HasColumnType("datetime");

                entityBuilder.Property(e => e.LastRepairDate).HasColumnType("datetime");

                entityBuilder.Property(e => e.LastRepairLevelName).HasMaxLength(20);

                entityBuilder.Property(e => e.LoadOilConsume).HasColumnType("decimal(18, 2)");

                entityBuilder.Property(e => e.LoadOilConsumeUnit).HasDefaultValueSql("((1))");

                entityBuilder.Property(e => e.MaintRuleName).HasMaxLength(20);

                entityBuilder.Property(e => e.MaintainCompanyName).HasMaxLength(100);

                entityBuilder.Property(e => e.MaintainContacts).HasMaxLength(50);

                entityBuilder.Property(e => e.MaintainPlace).HasMaxLength(100);

                entityBuilder.Property(e => e.ManagePerson).HasMaxLength(20);

                entityBuilder.Property(e => e.ManitTimes).HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.NeedMaintenance).HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.NeedRepaired).HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.NextMaintLevelName).HasMaxLength(20);

                entityBuilder.Property(e => e.NextRepairLevelName).HasMaxLength(20);

                entityBuilder.Property(e => e.OilConsume).HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.OilType).HasMaxLength(20);

                entityBuilder.Property(e => e.OutFactoryDate).HasColumnType("datetime");

                entityBuilder.Property(e => e.OutWareHouseDate).HasColumnType("datetime");

                entityBuilder.Property(e => e.PHONE).HasMaxLength(20);

                entityBuilder.Property(e => e.PowerFactor).HasColumnType("decimal(18, 3)");

                entityBuilder.Property(e => e.PrjCode).HasMaxLength(100);

                entityBuilder.Property(e => e.PrjName).HasMaxLength(100);

                entityBuilder.Property(e => e.RatedPower).HasColumnType("decimal(18, 2)");

                entityBuilder.Property(e => e.RepairRuleName).HasMaxLength(20);

                entityBuilder.Property(e => e.RunningPeriod)
                    .HasColumnType("decimal(18, 4)")
                    .HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.Status).HasDefaultValueSql("((2))");

                entityBuilder.Property(e => e.UtilPercent).HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.UtilPercentPeriod).HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.WareHouseCode).HasMaxLength(20);

                entityBuilder.Property(e => e.WareHouseId).HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.WareHouseName).HasMaxLength(50);

                entityBuilder.Property(e => e.bGenOnce).HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.bRunning).HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.ltOffTime).HasColumnType("datetime");

                entityBuilder.Property(e => e.ltOnTime).HasColumnType("datetime");

                entityBuilder.Property(e => e.sampIntervals).HasDefaultValueSql("((300))");
        }

    }
}

